package com.example.service.impl;
import com.example.mapper.SysUserMapper;
import com.example.model.SysUser;
import com.example.service.SysUserService;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@Service
public class SysUserServiceImpl implements SysUserService {
    @Resource
    public SysUserMapper sysUserMapper;
    /**
     * @param id
     * @Description 根据用户ID查询用户信息
     * @Author chengjunyu
     * @Date 2022/1/24 11:11
     * @Param id
     * @Return com.example.mybatis.model.SysUser
     * @Exception
     */
    @Override
    public SysUser selectSysUserById(int id) {
        return sysUserMapper.selectSysUserById(id);
    }
    /**
     * @param sysUser
     * @Description 新增用户信息
     * @Author chengjunyu
     * @Date 2022/1/24 11:12
     * @Param sysUser
     * @Return int
     * @Exception
     */
    @Async
    public int insertSysUser(SysUser sysUser) {
        return sysUserMapper.insertSysUser(sysUser);
    }
    /**
     * @param sysUser
     * @Description 修改用户信息
     * @Author chengjunyu
     * @Date 2022/1/24 11:12
     * @Param sysUser
     * @Return int
     * @Exception
     */
    @Override
    public int updateSysUser(SysUser sysUser) {
        return sysUserMapper.updateSysUser(sysUser);
    }
    /**
     * @param id
     * @Description 删除用户信息
     * @Author chengjunyu
     * @Date 2022/1/24 11:12
     * @Param id
     * @Return int
     * @Exception
     */
    @Override
    public int deleteSysUserById(int id) {
        return sysUserMapper.deleteSysUserById(id);
    }
}
